package cn.kgc.ssmmodulardemo.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * 面向用户添加的视图对象
 * @author 27498
 */
@Data
@ApiModel(description = "添加用户类")
public class AddUserVO {

    @NotNull(message = "用户名不能为空")
    @ApiModelProperty(notes = "用户名",required = true)
    private String userName;

    @NotNull(message = "密码不能为空")
    @ApiModelProperty(notes = "用户的密码",required = true)
    private String userPassword;

    @Min(value = 16,message = "最小值是16")
    @ApiModelProperty(notes = "用户的年龄 最小十六", required = true,example = "20")
    private Integer age;

    @Pattern(regexp = "^1[34578]\\d{9}$",message = "请输入正确的手机号")
    @ApiModelProperty(notes = "用户的手机号",required = true,example = "15296647220")
    private String phone;

    @NotNull(message = "地址不能为空")
    @ApiModelProperty(notes = "家庭地址",required = true,example = "中华人民共和国")
    private String address;

}
